package com.lzx.activity.controller;

import com.lzx.activity.service.VoucherOrderService;
import com.lzx.common.utils.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author lzx
 * @since 2022-11-10
 */
@RestController
@RequestMapping("/activity/voucherOrder")
public class VoucherOrderController {
    @Resource
    private VoucherOrderService voucherOrderService;

    //根据优惠券d获取抢购详情
    @GetMapping("/getVoucherOrderById/{voucherId}/{current}/{size}")
    public R getVoucherOrderById(@PathVariable Integer voucherId, @PathVariable int current, @PathVariable int size) {
        return voucherOrderService.getVoucherOrderById(voucherId, current, size);
    }
}
